home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 4_0 / AI88PATT / GETSTRNG.C < prev    next >
Text File  |  1990-01-07  |  342b  |  13 lines

  1. void getstrng(prompt,Default,response,buffer) 
  2. /* prompt for a  string to store in response, print Default */
  3.      char *prompt, *Default, *response, *buffer;
  4. {
  5.   printf("%s [%s] ",prompt,Default);
  6.   gets(buffer);
  7.  /* if(!strncmp(buffer,NULL,1))*/
  8.  if(!strcmp(buffer,"\0"))
  9.     strcpy(response,Default);
  10.   else
  11.     strcpy(response,buffer);
  12. }
  13.